for(var x = 1; x < 3; x++)
{
var select = document.getElementById("select1");
type();
}
function type()
{
var seldiv = select.getElementsByTagName("div");
var seleh3 = select.getElementsByTagName("h3");
var sdivul = seldiv[1].getElementsByTagName("ul");
for(var i = 0; i < seleh3.length; i++)
{
seleh3[i].num = i;
seleh3[i].onclick = show;
}
function show()
{
 for(var i = 0; i < seleh3.length; i++)
 {
 seleh3[i].className = ""
 }
seleh3[this.num].className = "sel"
 for(var i = 0; i < sdivul.length; i++)
 {
 sdivul[i].className = "none"
 }
sdivul[this.num].className = "block"
}
}